/**
 * 
 */

app.controller('cP003', ['$scope', '$interval', 'rApartment', function($scope, $interval, rApartment) {
//	$scope.userListVal = [];
	$scope.apartment;
	$interval(function() {
		rApartment.get().$promise.then(function(result) {
			$scope.apartment = result.apartment;
		});
	}, 1000);
			
	$scope.prettyDate = function (timeinmillis) {
	    return new Date(timeinmillis).toLocaleString();
	}
	$scope.isOccup = function (occup) {
	    if(occup === "true") return "Kullanılıyor";
	    else return "Kullanılmıyor";
	}
//   	rPrivilege.get().$promise.then(function(result) {
//		$scope.privilegeList = result;
//		for(i = 0; i < result.length; i++) {
//			$scope.privilegeListVal.push(false);
//		}
//	});
}]);
